<!-- 我的 -->
<template>
	<view id="mine_box">
		<view class="mine_info">
			
			<view class="mine_img">
				<!-- <open-data type="userAvatarUrl"></open-data> 已弃用-->
				<u-avatar :src="avatarUrl" size='120'></u-avatar>
			</view>
			<view class="mine_name">
				<view>{{nickName}}</view>
				<!-- <open-data type="userNickName"></open-data> -->
			</view>
		</view>
		<view class="mine_perMer">
			<view class="mine_label">
				<view class="label_icon">
					<u-icon label="个人中心" size="48" label-size="24" margin-left="12" :name="icons.gerenzhongxin"
						label-color="rgba(255, 255, 255, 1)">
					</u-icon>
				</view>
			</view>
			<view class="mine_icon">
				<u-row gutter="12">
					<u-col span="3">
						<view class="mine_icon_center">
							<u-icon label="我的收藏" size="60" label-size="20" margin-top="12" label-pos="bottom"
								:name="icons.wodeshoucang" @click="goto('../subpages/mycollect/mycollect')">
							</u-icon>
						</view>
					</u-col>
					<u-col span="3">
						<view class="mine_icon_center">
							<u-icon label="我的足迹" size="42" label-size="20" margin-top="12" label-pos="bottom"
								:name="icons.wodezuji" @click="goto('../subpages/footprint/footprint')">
							</u-icon>
						</view>
					</u-col>
					<u-col span="3">
						<view class="mine_icon_center">
							<u-icon label="我的需求" size="60" label-size="20" margin-top="12" label-pos="bottom"
								:name="icons.wodexuqiu" @click="goto('../subpages/myneed/myneed')">
							</u-icon>
						</view>
					</u-col>
					<u-col span="3">
						<view class="mine_icon_center">
							<u-icon label="个人信息" size="60" label-size="20" margin-top="12" label-pos="bottom"
							 name="setting-fill" @click="goto('../subpages/personalinfo/personalinfo')">
							</u-icon>
							<!-- <u-icon label="实名认证" size="60" label-size="20" margin-top="12" label-pos="bottom"
								:name="icons.shimingrenzheng"
								@click="goto('../subpages/Authentication/Authentication')">
							</u-icon> -->
						</view>
					</u-col>
				</u-row>
			</view>
		</view>
		<view class="mine_perMer">
			<view class="mine_label">
				<view class="label_icon">
					<u-icon label="我是商家" size="48" label-size="24" margin-left="12" :name="icons.woshishangjia"
						label-color="rgba(255, 255, 255, 1)" @click="goto()">
					</u-icon>
				</view>
			</view>
			<view class="mine_icon2">
				<u-row gutter="16">
					<u-col span="6" class="main_center">
						<view class="icon2_bac">
							<view class="icon2_position">
								<u-icon label="订单处理" size="48" label-size="24" margin-left="15" label-pos="right"
									:name="icons.dingdanchuli"
									@click="permission('../subpages/orderprocess/orderprocess')">
								</u-icon>
							</view>
						</view>
					</u-col>
					<u-col span="6">
						<view class="icon2_bac">
							<view class="icon2_position">
								<u-icon label="我的发布" size="48" label-size="24" margin-left="15" label-pos="right"
									:name="icons.wodefabu" @click="permission('../subpages/my_publish/my_publish')">
								</u-icon>
							</view>
						</view>
					</u-col>
<!-- 					<u-col span="4">
						<view class="icon2_bac">
							<view class="icon2_position">
								<u-icon label="资质认证" size="48" label-size="24" margin-left="15" label-pos="right"
									top="20" :name="icons.zizhirenzheng"
									@click="goto('../subpages/Authentication/Authentication_legal')">
								</u-icon>
							</view>
						</view>
					</u-col> -->
				</u-row>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		iconurl
	} from '../../uti/api.js'
	export default {
		data() {
			return {
				nickName: '微信用户',
				avatarUrl: '',
				icons: {
					gerenzhongxin: `${iconurl}/img/gerenzhongxin.svg`,
					wodeshoucang: `${iconurl}/img/wodeshoucang.svg`,
					wodezuji: `${iconurl}/img/wodezuji.svg`,
					wodexuqiu: `${iconurl}/img/wodexuqiu.svg`,
					shimingrenzheng: `${iconurl}/img/shimingrenzheng.svg`,
					woshishangjia: `${iconurl}/img/woshishangjia.svg`,
					dingdanchuli: `${iconurl}/img/dingdanchuli.svg`,
					wodefabu: `${iconurl}/img/wodefabu.svg`,
					zizhirenzheng: `${iconurl}/img/zizhirenzheng.svg`
				},

			}
		},
		mounted() {
			this.avatarUrl = getApp().globalData.avatarUrl;
			this.nickName = getApp().globalData.nickName;
		},
		methods: {
			permission(url) {
				// if (getApp().globalData.userinfo.userStatus < 1) {
				// 	uni.showToast({
				// 		title: '请先完成资质认证',
				// 		icon: 'error',
				// 		duration: 3000
				// 	})
				// 	return 0;
				// }
				this.goto(url);
			},
			goto(url) {
				uni.navigateTo({
					url: url,
					animationType: 'slide-in-right',
					animationDuration: 1000
				})
			},
		}
	}
</script>

<style>
	@import url("mine.css");
</style>
